﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


	<Style TargetType="TextBox" x:Key="TextBoxOverride">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TextBoxBase}">
					<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
						<ScrollViewer x:Name="PART_ContentHost" Template="{StaticResource ScrollViewerTemplate}" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsEnabled" Value="False">
							<Setter Property="Background" TargetName="border" Value="Transparent"/>
							<Setter Property="BorderBrush" TargetName="border" Value="Transparent" />
						</Trigger>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ComboBox.MouseOver.Border}"/>
						</Trigger>
						<Trigger Property="IsKeyboardFocused" Value="True">
							<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource ComboBox.Pressed.Border}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Background" Value="{DynamicResource NumericalIncrementer.Static.Background}" />
		<Setter Property="Foreground" Value="{DynamicResource TextForeground}" />
		<Setter Property="SelectionBrush" Value="{DynamicResource QOrange}" />
		<Setter Property="BorderBrush" Value="{DynamicResource ComboBox.Static.Border}" />
		<Setter Property="SelectionOpacity" Value="0.5" />
		<Style.Triggers>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Opacity" Value="1" />
				<Setter Property="Background" Value="{DynamicResource NumericalIncrementer.Static.Background}" />
			</Trigger>
		</Style.Triggers>
	</Style>

	<Style TargetType="TextBox" BasedOn="{StaticResource TextBoxOverride}" />

</ResourceDictionary>
